package org.jiuling.baidu.nlp.spring.config;

import org.jiuling.baidu.nlp.AddressRecognition;
import org.jiuling.baidu.nlp.config.BaiDuNlpConfig;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * 百度自然语言识别SpringBean配置
 * @author 紫灵
 * @date 2024年08月18日 17时50分20秒
 */
@Configuration
public class BiDuNlpSpringBeanConfig {

    @Bean
    @ConfigurationProperties(prefix = "jiu-ling.baidu.config.nlp")
    public BaiDuNlpConfig baiDuNlpConfig() {
        return new BaiDuNlpConfig();
    }

    @Bean
    public AddressRecognition addressRecognition() {
        return new AddressRecognition(baiDuNlpConfig());
    }

}
